<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <title>循环中的代码块应用template</title>
        <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.12/vue.js"></script>
    </head>

    <body>
        <div id="app">
            <ul>
                <li v-for="(ingredient,i) in ingredients">
                    {{ingredient}} ({{i}})
                </li>
            </ul>
            <!-- TODO:块级代码的应用 -->
        </div>
        <script type="text/javascript">
            new Vue({
                el: '#app',
                data: {
                    ingredients: ['meat', 'fruit', 'cookies'],
                },
            });
        </script>
    </body>
</html>
